package li.kaeppe.travel.tracker.web.bean;

import java.util.Date;

import org.apache.myfaces.custom.fileupload.UploadedFile;

public class UploadFileBean {
	/* **************************************************** */
	/*                      CONSTANTS                       */
	/* **************************************************** */
	
	/* **************************************************** */
	/*                     MEMBER FIELDS                    */
	/* **************************************************** */
	
	private UploadedFile file;
	
	private Long tripId;
	
	private Date startDate = null;
	
	private boolean timeRequired = false;
	
	//private Trip trip;
	
	/* **************************************************** */
	/*                      CONSTRUCTOR                     */
	/* **************************************************** */
	
	/* **************************************************** */
	/*                    PUBLIC METHODS                    */
	/* **************************************************** */
	
	public void reset() {
		this.setFile(null);
		this.setStartDate(null);
		this.setTimeRequired(false);
		this.setTripId(-1l);
	}
	
	/* **************************************************** */
	/*                  PROTECTED METHODS                   */
	/* **************************************************** */
	
	/* **************************************************** */
	/*                   PRIVATE METHODS                    */
	/* **************************************************** */
	
	/* **************************************************** */
	/*                  GETTERS AND SETTERS                 */
	/* **************************************************** */
	
//	public Trip getTrip() {
//		return trip;
//	}
//
//	public void setTrip(Trip trip) {
//		this.trip = trip;
//	}

	public Long getTripId() {
		return tripId;
	}

	public void setTripId(Long tripId) {
		this.tripId = tripId;
	}

	public UploadedFile getFile() {
		return file;
	}

	public void setFile(UploadedFile file) {
		this.file = file;
	}

	public boolean isTimeRequired() {
		return timeRequired;
	}

	public void setTimeRequired(boolean timeRequired) {
		this.timeRequired = timeRequired;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
}
